//----------此处只添加小黑记事本路由与处理函数的映射关系表----------------

const express = require("express");
const router = express.Router();

//导入处理模块
const xhjsb_handler = require("../router_handle/xhjsb");

//导入规则中间件模块
const expressjoi = require("@escook/express-joi");

//导入规则模块
const xhjsb_schema = require("../schema/xhjsb_schema");

//获得小黑记事本列表的路由模块
router.get(
  "/getlist",
  expressjoi(xhjsb_schema.getList_schema),
  xhjsb_handler.getXhList
);

//新增小黑记事本列表的路由模块
router.post(
  "/addlist",
  expressjoi(xhjsb_schema.addXhList_schema),
  xhjsb_handler.addXhList
);

//根据id删除小黑记事本列表的路由模块
router.delete(
  "/delete/:id",
  expressjoi(xhjsb_schema.deleteList_schema),
  xhjsb_handler.deleteList
);

module.exports = router;
